Network controllers perform several tasks, including controlling the transmission to and reception of data from a network. Typically, when a transmission of data is to occur, data received from the operating system in one form must be translated to a form recognizable by the network controller and the network. Similarly, data received from the network must be translated into data which the operating system can understand. These packets must also be indexed in a manner that allows the network controller to pass the packet between the operating system and the network.
In the operating system, packets are typically indexed using a protocol structure. For example, a typical protocol structure for an ETHERNET packet includes the virtual address, the data length, and a handler. The handler contains protocol parameters that identify the packet to the protocol in a unique way. This protocol structure must be converted into a form usable by the network controller.
In order to transmit the packet, the conventional network drivers ("drivers") store the packet on the network controller prior to being sent to the network. In order to index the packet, conventional drivers convert the protocol structure into a hardware specific structure. The hardware structure, the hardware descriptor, contains the data length, the status of the packet, and the physical address of the packet. The physical address denotes where the packet is stored. Thus, in order to transmit the packet, the typical network controllers use the physical address of the packet.
Once the transmission of a particular packet has finished, the driver typically receives a hardware interrupt and then issues a call to the protocol indicating that transmission is complete. The driver has to submit the handler as a parameter for this call. However, because the protocol identifies data packets using handlers, while the network controller uses the physical address, the driver may not know to which handler, or packet, the interrupt refers. In other words, the driver does not know the protocol structure which corresponds to a particular hardware descriptor the hardware just completed. If the driver cannot specify (to the protocol) the handler for a particular packet, either the handler cannot be reused or the data corresponding to the handler may be accidentally overwritten.
In order to identify which protocol structure corresponds to a particular hardware descriptor, conventional drivers use a software table. Typical drivers use a table which indexes the physical address in the hardware descriptor with the handler of the protocol structure. Software searches the table for the handler corresponding to the physical address of a packet that has completed transmission. Only after the handler has been found can the driver release the handler to the protocol.
In addition to the transmit process discussed, other processes carried out by the network controller also require a software table search in order to pass data between the network, the network controller, and the operating system. For example, a receive of a packet will also require a search of a software table before a message can be released to the operating system in a form the operating system can understand.
To search the software table, many conventional systems use a linear search. In addition, software tables may possess up to several hundred entries. Consequently, the search may take a relatively long time or be inefficient, thereby slowing data processing. In addition, because the table is implemented in software, changes in the protocol may require changes in the implementation of the table to preserve current operating efficiency. Although the software table may be changed to adapt to the new protocol, implementation of the software table may be time consuming or difficult.
Accordingly, what is needed is a system and method for expediting data processing. The present invention addresses such a need.